package android.meetingatsb.common

import android.os.Parcel
import android.os.Parcelable

class Requirement(var group: String?, var location: String?, var time: String?, var addition: String?): Parcelable {
    constructor(parcel: Parcel) : this(
            parcel.readString(),
            parcel.readString(),
            parcel.readString(),
            parcel.readString()) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(group)
        parcel.writeString(location)
        parcel.writeString(time)
        parcel.writeString(addition)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<Requirement> {
        override fun createFromParcel(parcel: Parcel): Requirement {
            return Requirement(parcel)
        }

        override fun newArray(size: Int): Array<Requirement?> {
            return arrayOfNulls(size)
        }
    }
}